
<?php
session_start();
require_once("./connect.php");
 

$ini = parse_ini_file('config.ini', false);
mysql_select_db($ini['dbName']);
if (mysql_select_db($ini['dbName'])) {
    
    ///////////////////
    
 
   $temp=$_SESSION['format'];
    
    $q = "Select * From shapes Where id='$temp'";
 
   $r = mysql_query($q);


    while ($row = mysql_fetch_array($r)) {

        $formatName = $row['id'];
//echo ($formatName);
        // $fillingName=$row['name'];
//echo '<img src="' . $img . '" style="cursor:pointer;" width="220" height="200" alt="' . $img . '"/>' . "\n";
        // echo $img;
        //echo "<input class='radioFilling' type='radio' name='fillingType' value='". $fillingName ."' /><b> ". $fillingName ."</b>";
        $front = $row['front'];
        $back = $row['back'];
        $left = $row['left'];
        $right = $row['right'];
        $top = $row['top'];
        $bottom = $row['bottom'];
        /*
          echo ($front);
          echo ($back);
          echo ($left);
          echo ($right);
          echo ($top);
          echo ($bottom);
         */


        if ($front == 1) {
            echo"<button name='addtext' class='toolbarViewBtn'  id='frontdivimg'><img src='imagesapp/front_view.png' width='18' alt='Front View' /></button>";
        }
        if ($back == 1) {
            echo"<button name='addtext' class='toolbarViewBtn'  id='backdivimg'><img src='imagesapp/back_view.png' width='18' alt='Back View' /></button>";
        }
        if ($left == 1) {
            echo "<button name='addtext' class='toolbarViewBtn'  id='leftdivimg'><img src='imagesapp/left_view.png' width='18' alt='Left View' /></button>";
        }
        if ($right == 1) {
            echo "<button name='addtext' class='toolbarViewBtn'  id='rightdivimg'><img src='imagesapp/right_view.png' width='18' alt='Right View' /></button>";
        }


        /*
          echo "<div style='float:left; padding:5px;'><div style='text-align:center'><img class='cuttings' src='".$formatName."' width='60' height='60' /></div><div style='text-align:center'><input class='radioFilling' type='radio' name='fillingType' value='". $fillingName ."' /><b> ". $fillingName ."</b></div></div>";
         */
    }
}
?>